import { createWebHistory, createRouter } from 'vue-router'
import Home from "../views/Home.vue"
import AdminUser from "../views/AdminUser.vue";
import AdminAdd from "../views/AdminAdd.vue";
import add from "../views/add.vue"
import Role from "../views/Role.vue";
//配置路径关系
const routes = [
  {
    path:"/",
    component:Home
  },
    {
      path:"/add",
      component:add
    }
  ,{
    path:"/adminuser",
    component:AdminUser
  },{
    path:"/adminadd",
    component:AdminAdd
  },{
    path:"/role",
    component:Role
  },
]

//将创建的配置关系挂载到router实例上
const router = createRouter({
  history: createWebHistory(),
  routes
})

export default router